package com.blb.zycommunity.entity.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;


/**
 * <p>
 * 操作日志记录
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Data
@ColumnWidth(25)                                //列宽
@HeadFontStyle(fontHeightInPoints = 20)         //标题行高
@ContentFontStyle(fontHeightInPoints = 12)      //内容行高
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, fillBackgroundColor = -1) //内容居中，颜色默认
public class SysOperLogExcelWrite implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty("日志编号")
    @ApiModelProperty("日志主键")
    @TableId(value = "oper_id", type = IdType.AUTO)
    private Long operId;

    @ExcelProperty("模块标题")
    @ApiModelProperty("模块标题")
    private String title;

    @ExcelProperty("业务类型（0其它 1新增 2修改 3删除）")
    @ApiModelProperty("业务类型（0其它 1新增 2修改 3删除）")
    private Integer businessType;

    @ExcelProperty("方法名称")
    @ApiModelProperty("方法名称")
    private String method;

    @ExcelProperty("请求方式")
    @ApiModelProperty("请求方式")
    private String requestMethod;

    @ExcelProperty("操作类别（0其它 1后台用户 2手机端用户）")
    @ApiModelProperty("操作类别（0其它 1后台用户 2手机端用户）")
    private Integer operatorType;

    @ExcelProperty("操作人员")
    @ApiModelProperty("操作人员")
    private String operName;

    @ExcelProperty("部门名称")
    @ApiModelProperty("部门名称")
    private String deptName;

    @ExcelProperty("请求URL")
    @ApiModelProperty("请求URL")
    private String operUrl;

    @ExcelProperty("主机地址")
    @ApiModelProperty("主机地址")
    private String operIp;

    @ExcelProperty("操作地点")
    @ApiModelProperty("操作地点")
    private String operLocation;

    @ExcelProperty("请求参数")
    @ApiModelProperty("请求参数")
    private String operParam;

    @ExcelProperty("返回参数")
    @ApiModelProperty("返回参数")
    private String jsonResult;

    @ExcelProperty("操作状态（0正常 1异常）")
    @ApiModelProperty("操作状态（0正常 1异常）")
    private Integer status;

    @ExcelProperty("错误消息")
    @ApiModelProperty("错误消息")
    private String errorMsg;

    @ExcelProperty("操作时间")
    @ApiModelProperty("操作时间")
    private java.time.LocalDateTime operTime;

    public Long getOperId() {
        return operId;
    }

    public void setOperId(Long operId) {
        this.operId = operId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public Integer getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperName() {
        return operName;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getOperUrl() {
        return operUrl;
    }

    public void setOperUrl(String operUrl) {
        this.operUrl = operUrl;
    }

    public String getOperIp() {
        return operIp;
    }

    public void setOperIp(String operIp) {
        this.operIp = operIp;
    }

    public String getOperLocation() {
        return operLocation;
    }

    public void setOperLocation(String operLocation) {
        this.operLocation = operLocation;
    }

    public String getOperParam() {
        return operParam;
    }

    public void setOperParam(String operParam) {
        this.operParam = operParam;
    }

    public String getJsonResult() {
        return jsonResult;
    }

    public void setJsonResult(String jsonResult) {
        this.jsonResult = jsonResult;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public java.time.LocalDateTime getOperTime() {
        return operTime;
    }

    public void setOperTime(java.time.LocalDateTime operTime) {
        this.operTime = operTime;
    }

    @Override
    public String toString() {
        return "SysOperLog{" +
            "operId = " + operId +
            ", title = " + title +
            ", businessType = " + businessType +
            ", method = " + method +
            ", requestMethod = " + requestMethod +
            ", operatorType = " + operatorType +
            ", operName = " + operName +
            ", deptName = " + deptName +
            ", operUrl = " + operUrl +
            ", operIp = " + operIp +
            ", operLocation = " + operLocation +
            ", operParam = " + operParam +
            ", jsonResult = " + jsonResult +
            ", status = " + status +
            ", errorMsg = " + errorMsg +
            ", operTime = " + operTime +
        "}";
    }
}
